package com.project.communitymanagement.controller;

import com.project.communitymanagement.common.BaseController;
import com.project.communitymanagement.common.Page;
import com.project.communitymanagement.common.ResponseEntity;
import com.project.communitymanagement.entity.TbLeaveInfo;
import com.project.communitymanagement.service.TbLeaveInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("tbleaveinfo")
public class TbLeaveInfoController extends BaseController<TbLeaveInfoService, TbLeaveInfo> {

    @Autowired
    private TbLeaveInfoService tbleaveinfoService;

    @Override
    protected TbLeaveInfoService service() {
        return tbleaveinfoService;
    }

    /**审批列表*/
    @GetMapping("approvalList")
    public ResponseEntity<Page> approvalList(){
        return ResponseEntity.success(tbleaveinfoService.approvalList());
    }


}
